package me.hys.action.comm;

import me.hys.base.BaseAction;
import me.hys.kits.UploadKit;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

/**
 * Author: @author HYS . <br>
 * Date: 2015-9-21 下午9:54:54 . <br>
 * Function: 通用Acton
 */
@Controller
@RequestMapping("/comm")
public class CommAction extends BaseAction {
	@ResponseBody
	@RequestMapping("/upload")
	public String uploadImg(@RequestParam MultipartFile file) {
		return UploadKit.upload(request, String.valueOf(getUser().getId()),
				file);
	}
}
